package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.VideoPileSlotDTO;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotDeviceVideoPileSlot;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ParkingLotDeviceVideoPileSlotMapper extends BaseMapper<ParkingLotDeviceVideoPileSlot> {


    /**
     * insert
     *
     * @param videoPileSlots 实体
     * @return
     */
    void insertSlotsBatch(List<ParkingLotDeviceVideoPileSlot> videoPileSlots);

    /**
     * 复合主键移除
     *
     * @param id 实体
     * @return
     */
    void deleteByVideoPileId(Long id);

    List<VideoPileSlotDTO> getVideoPileByIds(@Param("videoPileIds") List<Long> videoPileIds,@Param("slotIds")List<String> slotIds);

    /**
     * 根据车场code获取安装了视频桩的泊位id列表
     * @param parkingLotCode
     * @return
     */
    List<Long> selectVideo(String parkingLotCode);
}
